const CryptoJS = require("crypto-js");

const o_default_codes = {
    "0": "W",
    "1": "l",
    "2": "k",
    "3": "B",
    "4": "Q",
    "5": "g",
    "6": "f",
    "7": "i",
    "8": "i",
    "9": "r",
    "10": "v",
    "11": "6",
    "12": "A",
    "13": "K",
    "14": "N",
    "15": "k",
    "16": "4",
    "17": "L",
    "18": "1",
    "19": "8"
};
const o_default_n = 20;

function inner_a_default(str) {
    let encodedStr = '';
    for (let i = 0; i < str.length; ++i) {
        const index = str.charCodeAt(i) % o_default_n;
        encodedStr += o_default_codes[index.toString()];
    }
    return encodedStr;
}

function o_default(e, t) {
    return CryptoJS.HmacSHA256(e, t).toString();
}

function a_default() {
    const key = "iLAgiQ6rliBl4vl8kkiLkQBkgNk4NLvigvWlWl1iLk4NLvigvWlWlrkivivK4iK6rA1iLk4NLvi4grllrkivivK4iK6rA1ALBlkgkllriiLAgiQ6rliBl4vl8kkiLkQBkgNk4NLvigvWlWl1iLk4NLvigvWlWlrkivivK4iK6rA1iLk4NLvi4grllrkivivK4iK6rA1ALBlkgkllri"; // 事先给定的密钥
    const data = "123456".toLowerCase();
    const hmacResult = o_default(data, key); // 使用给定密钥进行 HMAC 加密
    return hmacResult.toLowerCase().substr(8, 20);
}

console.log(a_default());
